﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;

public partial class SiteMaster : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Authentication auth = (Authentication)Session[GlobalConstant.LOGIN_STATE];
            if (auth.privilege == Authentication.VISITOR)
            {
                Response.Redirect("~/Login.aspx");
            }
        }
    }
    protected void logOut(object sender, EventArgs e)
    {
        Authentication auth = (Authentication)Session[GlobalConstant.LOGIN_STATE];
        auth.privilege = Authentication.VISITOR;
        Response.Redirect("~/Default.aspx");
    }

    protected void changePassword(object sender, EventArgs e)
    {                
        Response.Redirect("~/Default.aspx");
    }
}
